Held-Suarez demo


The Held-Suarez (Held and Suarez (1994)) test case is one of the most famous test cases to study the long-term behaviour (i.e, the climate) of a dynamical core.

The test consists of relaxing the temperature field to a prescribed profile which supports a circulation similar to the general circulation of the earth's atmosphere, and generating a steady state by removing energy by friction on the winds at the planet's surface.


In [ ]:
%matplotlib notebook

from climt.held_suarez import held_suarez
from climt.dynamics import dynamics
from climt.federation import federation
import numpy as np

#Dynamical core Parameters
timestep = 1800.
kwargs = {}
kwargs['dt'] = timestep
kwargs['nlon'] = 92
kwargs['nlat'] = 44

dycore = dynamics(scheme='gfs', **kwargs)

# Intialise Held-Suarez
kwargs = {}
kwargs['dt'] = timestep

dycore_grid = dycore.getGrid()

kwargs['grid'] = dycore_grid
hs = held_suarez(**kwargs)
nhours = 2000*24.
nsteps = int((nhours*3600)/kwargs['dt'])
print 'Num Steps: ', nsteps

kwargs = {}
kwargs['dt'] = timestep
#kwargs['p'] = dycore['p']
#kwargs['U'] = dycore['U']
#kwargs['V'] = dycore['V']
#kwargs['T'] = dycore['T']
#kwargs['ps'] = dycore['ps']
#kwargs['pint'] = dycore['pint']
kwargs['MonitorFields'] = ['U', 'T', 'V']
kwargs['MonitorFreq'] = 3600.*12
kwargs['OutputFile'] = 'HS.nc'
kwargs['OutputFreq'] = 86400*30.
kwargs['OutputFields'] = ['U','T']
kwargs['grid'] = dycore_grid

fed = federation(dycore, hs, **kwargs)

for i in range(nsteps):
    fed.step()

del(fed)
del(dycore)

In [ ]: